<!-- thanh toolbar -->
<?php $this->placeholder('toolbar')->captureStart();?>
	<?php echo $this->partial('index/toolbar/save-order.phtml', 'admin') ?>
	<?php echo $this->partial('index/toolbar/divider.phtml', 'admin') ?>
	<?php echo $this->partial('index/toolbar/publish.phtml', 'admin') ?>
	<?php echo $this->partial('index/toolbar/unpublish.phtml', 'admin') ?>
	<?php echo $this->partial('index/toolbar/divider.phtml', 'admin') ?>
	<?php echo $this->partial('index/toolbar/new.phtml', 'admin', array($this->url(array('action' => 'insert')))) ?>
	<?php echo $this->partial('index/toolbar/edit.phtml', 'admin', array($this->url(array('action' => 'update')))) ?>
	<?php echo $this->partial('index/toolbar/divider.phtml', 'admin') ?>
	<?php echo $this->partial('index/toolbar/trash.phtml', 'admin', array($this->url(array('action' => 'delete')))) ?>
	<?php echo $this->partial('index/toolbar/back.phtml', 'admin', array($this->url(array('module'=>'location'), NULL, TRUE))) ?>
<?php $this->placeholder('toolbar')->captureEnd();?>
<!-- / --> 

<form id='adminForm' name='adminForm' method='post' action=''>	

	<?php if (!is_null($this->location)): ?>
	<dl class="zend_form">
		<fieldset>
			<legend>Thông tin vị trí kho</legend>
			<?php echo $this->form->location_code ;?>
			<?php echo $this->form->location_name ;?>
			<?php echo $this->form->location_warehouse_code ;?>
			<?php echo $this->form->location_note ;?>
			<?php echo $this->form->location_status ;?>
		</fieldset>
	</dl>
	<?php endif ;?>
	
	<fieldset>
		<legend>Sức chứa kho</legend>
		<!-- phần tìm kiếm -->
		<fieldset id='filter-bar' style='height: auto'>
			<?php echo $this->partial('index/search/layout.phtml', 'admin',array ( 
				 $this->partial('index/search/all.phtml', 'admin',array('value'=>$this->search_keyword)), 	
				 $this->partial('index/search/submit.phtml', 'admin') 
			 )); ?>		
			<?php echo $this->partial('index/filter/layout.phtml', 'admin',array (		
				$this->partial('index/filter/publish.phtml', 'admin',array('name'=>'location_contain_status','value'=>$this->location_contain_status)) 
			 )); ?>		 
		</fieldset>	
		<!-- / -->
		
		<!-- danh sách hiển thị -->
		<div class='clr'> </div>
		<table class='adminlist'>
			<thead>			
				<tr>
					<?php echo $this->partial('index/manage/save-order.phtml', 'admin', array('column'=>'location_contain_order')); ?>
					<?php echo $this->partial('index/manage/checkbox-all.phtml', 'admin'); ?>	
					<th>
						<?php echo $this->partial('index/manage/header.phtml','admin',array('caption'=>$this->captions,'column'=>'location_contain_location_code')); ?>
					</th>
					
					<th>
						<?php echo $this->partial('index/manage/header.phtml','admin',array('caption'=>$this->captions,'column'=>'location_contain_product_code')); ?>
					</th>
					
					<th>
						<?php echo $this->partial('index/manage/header.phtml','admin',array('caption'=>$this->captions,'column'=>'location_contain_max')); ?>
					</th>
					
					<th>
						<?php echo $this->partial('index/manage/header.phtml','admin',array('caption'=>$this->captions,'column'=>'location_contain_unit_code')); ?>
					</th>
					
					<th width='80px'>
						<?php echo $this->partial('index/manage/header.phtml','admin',array('caption'=>$this->captions,'column'=>'location_contain_status')); ?>
					</th>
					<th width='65px'>
						Quản lý
					</th>
				</tr>
			</thead>
			<tbody>
			<?php if (count($this->paginator) > 0): $no=0;?>
			<?php foreach ($this->paginator as $row): ?>
				<tr class='row<?php echo ($no++)%2 ?>'>
					<?php echo $this->partial('index/manage/orderer.phtml', 'admin', array($row->location_contain_id, $row->location_contain_order)) ?>
					<?php echo $this->partial('index/manage/checkbox.phtml', 'admin', array($row->location_contain_id)) ?>
					<td class='left'>
						<?php echo $row->location_contain_location_code; ?>
					</td>
					<td class='left'>
						<?php echo $row->location_contain_product_code; ?>
					</td>
					<td class='right'>
						<?php echo $this->partial('index/format/float.phtml','admin',array($row->location_contain_max)); ?>
					</td>
					<td class='left'>
						<?php echo $row->location_contain_unit_code; ?>
					</td>
					<td class='center'>
						<?php echo $this->partial('index/manage/publish.phtml','admin', array($this->url(array('action' => 'publish')),$row->location_contain_status)); ?>	
					</td>
					<td class='center'>				
						<?php echo $this->partial('index/manage/edit.phtml','admin', array($this->url(array('action' => 'update','id'=>$row->location_contain_id)))); ?>
						<?php echo $this->partial('index/manage/trash.phtml','admin', array($this->url(array('action' => 'delete')))); ?>	
					</td>
				</tr>
			<?php endforeach; ?>
			<?php endif; ?>
			</tbody>
			<tfoot>
				<tr>
					<td colspan='10'>
						<div class='container'>
							<?php echo $this->paginationControl($this->paginator) ?>
						</div>
					</td>
				</tr>
			</tfoot>
		</table>
		<!-- / -->
	</fieldset>
</form>
